package com.example.android.kotlin

fun main() {
    val res = printPlus("呼噜", 111)
    println(res)
    val geClass = GenericClass("小橘")
    println(geClass.getSome())
}

//泛型函数
fun <T, D> printPlus(t: T, d: D): T {
    println("返回值" + t + d)
    return t
}

//泛型类
class GenericClass<T>(var name: T) {
    fun getSome(): T {
        println("泛型类" + name)
        return name
    }
}
